/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('vdmeter', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model DescribeHuYaRecordByDomainRequest {
  businessType?: string(name='BusinessType'),
  domain?: string(name='Domain'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
}

model DescribeHuYaRecordByDomainResponseBody = {
  requestId?: string(name='RequestId'),
  result?: string(name='Result'),
  resultDesc?: [ 
    {
      businessType?: string(name='BusinessType'),
      domain?: string(name='Domain'),
      recordDuration?: long(name='RecordDuration'),
      recordNum?: long(name='RecordNum'),
      recordType?: string(name='RecordType'),
      time?: string(name='Time'),
    }
  ](name='ResultDesc'),
  status?: int32(name='Status'),
}

model DescribeHuYaRecordByDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeHuYaRecordByDomainResponseBody(name='body'),
}

async function describeHuYaRecordByDomainWithOptions(request: DescribeHuYaRecordByDomainRequest, runtime: Util.RuntimeOptions): DescribeHuYaRecordByDomainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.businessType)) {
    query['BusinessType'] = request.businessType;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeHuYaRecordByDomain',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeHuYaRecordByDomain(request: DescribeHuYaRecordByDomainRequest): DescribeHuYaRecordByDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHuYaRecordByDomainWithOptions(request, runtime);
}

model DescribeHuYaScreenshotByDomainRequest {
  businessType?: string(name='BusinessType'),
  domain?: string(name='Domain'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
}

model DescribeHuYaScreenshotByDomainResponseBody = {
  requestId?: string(name='RequestId'),
  result?: string(name='Result'),
  resultDesc?: [ 
    {
      businessType?: string(name='BusinessType'),
      domain?: string(name='Domain'),
      screenshotNum?: long(name='ScreenshotNum'),
      time?: string(name='Time'),
    }
  ](name='ResultDesc'),
  status?: int32(name='Status'),
}

model DescribeHuYaScreenshotByDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeHuYaScreenshotByDomainResponseBody(name='body'),
}

async function describeHuYaScreenshotByDomainWithOptions(request: DescribeHuYaScreenshotByDomainRequest, runtime: Util.RuntimeOptions): DescribeHuYaScreenshotByDomainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.businessType)) {
    query['BusinessType'] = request.businessType;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeHuYaScreenshotByDomain',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeHuYaScreenshotByDomain(request: DescribeHuYaScreenshotByDomainRequest): DescribeHuYaScreenshotByDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHuYaScreenshotByDomainWithOptions(request, runtime);
}

model DescribeHuYaTranscodeByDomainRequest {
  businessType?: string(name='BusinessType'),
  domain?: string(name='Domain'),
  endTime?: string(name='EndTime'),
  startTime?: string(name='StartTime'),
}

model DescribeHuYaTranscodeByDomainResponseBody = {
  requestId?: string(name='RequestId'),
  result?: string(name='Result'),
  resultDesc?: [ 
    {
      businessType?: string(name='BusinessType'),
      domain?: string(name='Domain'),
      time?: string(name='Time'),
      transcodeDuration?: long(name='TranscodeDuration'),
      transcodeNum?: long(name='TranscodeNum'),
      transcodeType?: string(name='TranscodeType'),
    }
  ](name='ResultDesc'),
  status?: int32(name='Status'),
}

model DescribeHuYaTranscodeByDomainResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeHuYaTranscodeByDomainResponseBody(name='body'),
}

async function describeHuYaTranscodeByDomainWithOptions(request: DescribeHuYaTranscodeByDomainRequest, runtime: Util.RuntimeOptions): DescribeHuYaTranscodeByDomainResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.businessType)) {
    query['BusinessType'] = request.businessType;
  }
  if (!Util.isUnset(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeHuYaTranscodeByDomain',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeHuYaTranscodeByDomain(request: DescribeHuYaTranscodeByDomainRequest): DescribeHuYaTranscodeByDomainResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeHuYaTranscodeByDomainWithOptions(request, runtime);
}

model DescribeMeterBypassRtUsageByTaskProfileRequest {
  appId?: string(name='AppId'),
  endTs?: long(name='EndTs'),
  interval?: long(name='Interval'),
  serviceArea?: string(name='ServiceArea'),
  startTs?: long(name='StartTs'),
}

model DescribeMeterBypassRtUsageByTaskProfileResponseBody = {
  data?: [ 
    {
      duration?: long(name='Duration'),
      ratio?: string(name='Ratio'),
      serviceArea?: string(name='ServiceArea'),
      taskProfile?: string(name='TaskProfile'),
      timestamp?: long(name='Timestamp'),
      type?: string(name='Type'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeMeterBypassRtUsageByTaskProfileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMeterBypassRtUsageByTaskProfileResponseBody(name='body'),
}

async function describeMeterBypassRtUsageByTaskProfileWithOptions(request: DescribeMeterBypassRtUsageByTaskProfileRequest, runtime: Util.RuntimeOptions): DescribeMeterBypassRtUsageByTaskProfileResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!Util.isUnset(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterBypassRtUsageByTaskProfile',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterBypassRtUsageByTaskProfile(request: DescribeMeterBypassRtUsageByTaskProfileRequest): DescribeMeterBypassRtUsageByTaskProfileResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterBypassRtUsageByTaskProfileWithOptions(request, runtime);
}

model DescribeMeterMpuTranscodeRtUsageByTaskProfileRequest {
  appId?: string(name='AppId'),
  endTs?: long(name='EndTs'),
  interval?: long(name='Interval'),
  serviceArea?: string(name='ServiceArea'),
  startTs?: long(name='StartTs'),
}

model DescribeMeterMpuTranscodeRtUsageByTaskProfileResponseBody = {
  data?: [ 
    {
      duration?: long(name='Duration'),
      serviceArea?: string(name='ServiceArea'),
      taskProfile?: string(name='TaskProfile'),
      timeStamp?: long(name='TimeStamp'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeMeterMpuTranscodeRtUsageByTaskProfileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMeterMpuTranscodeRtUsageByTaskProfileResponseBody(name='body'),
}

async function describeMeterMpuTranscodeRtUsageByTaskProfileWithOptions(request: DescribeMeterMpuTranscodeRtUsageByTaskProfileRequest, runtime: Util.RuntimeOptions): DescribeMeterMpuTranscodeRtUsageByTaskProfileResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!Util.isUnset(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterMpuTranscodeRtUsageByTaskProfile',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterMpuTranscodeRtUsageByTaskProfile(request: DescribeMeterMpuTranscodeRtUsageByTaskProfileRequest): DescribeMeterMpuTranscodeRtUsageByTaskProfileResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterMpuTranscodeRtUsageByTaskProfileWithOptions(request, runtime);
}

model DescribeMeterRecordRtUsageByTaskProfileRequest {
  appId?: string(name='AppId'),
  endTs?: long(name='EndTs'),
  interval?: long(name='Interval'),
  serviceArea?: string(name='ServiceArea'),
  startTs?: long(name='StartTs'),
}

model DescribeMeterRecordRtUsageByTaskProfileResponseBody = {
  data?: [ 
    {
      duration?: long(name='Duration'),
      ratio?: string(name='Ratio'),
      serviceArea?: string(name='ServiceArea'),
      taskProfile?: string(name='TaskProfile'),
      timestamp?: long(name='Timestamp'),
      type?: string(name='Type'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeMeterRecordRtUsageByTaskProfileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMeterRecordRtUsageByTaskProfileResponseBody(name='body'),
}

async function describeMeterRecordRtUsageByTaskProfileWithOptions(request: DescribeMeterRecordRtUsageByTaskProfileRequest, runtime: Util.RuntimeOptions): DescribeMeterRecordRtUsageByTaskProfileResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!Util.isUnset(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterRecordRtUsageByTaskProfile',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterRecordRtUsageByTaskProfile(request: DescribeMeterRecordRtUsageByTaskProfileRequest): DescribeMeterRecordRtUsageByTaskProfileResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterRecordRtUsageByTaskProfileWithOptions(request, runtime);
}

model DescribeMeterRtcApproxPeakRateRequest {
  appId?: string(name='AppId'),
  endTs?: long(name='EndTs'),
  interval?: long(name='Interval'),
  serviceArea?: string(name='ServiceArea'),
  startTs?: long(name='StartTs'),
}

model DescribeMeterRtcApproxPeakRateResponseBody = {
  approxPeakRate?: float(name='ApproxPeakRate'),
  approxPeakTs?: long(name='ApproxPeakTs'),
  peakRateVoList?: [ 
    {
      peakRate?: float(name='PeakRate'),
      peakTs?: long(name='PeakTs'),
      timestamp?: long(name='Timestamp'),
    }
  ](name='PeakRateVoList'),
  requestId?: string(name='RequestId'),
}

model DescribeMeterRtcApproxPeakRateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMeterRtcApproxPeakRateResponseBody(name='body'),
}

async function describeMeterRtcApproxPeakRateWithOptions(request: DescribeMeterRtcApproxPeakRateRequest, runtime: Util.RuntimeOptions): DescribeMeterRtcApproxPeakRateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!Util.isUnset(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterRtcApproxPeakRate',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterRtcApproxPeakRate(request: DescribeMeterRtcApproxPeakRateRequest): DescribeMeterRtcApproxPeakRateResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterRtcApproxPeakRateWithOptions(request, runtime);
}

model DescribeMeterRtcChannelCntDataRequest {
  appId?: string(name='AppId'),
  endTs?: long(name='EndTs'),
  interval?: long(name='Interval'),
  serviceArea?: string(name='ServiceArea'),
  startTs?: long(name='StartTs'),
}

model DescribeMeterRtcChannelCntDataResponseBody = {
  data?: [ 
    {
      channelCnt?: long(name='ChannelCnt'),
      timestamp?: string(name='Timestamp'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeMeterRtcChannelCntDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMeterRtcChannelCntDataResponseBody(name='body'),
}

async function describeMeterRtcChannelCntDataWithOptions(request: DescribeMeterRtcChannelCntDataRequest, runtime: Util.RuntimeOptions): DescribeMeterRtcChannelCntDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!Util.isUnset(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterRtcChannelCntData',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterRtcChannelCntData(request: DescribeMeterRtcChannelCntDataRequest): DescribeMeterRtcChannelCntDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterRtcChannelCntDataWithOptions(request, runtime);
}

model DescribeMeterRtcDurationRequest {
  appId?: string(name='AppId'),
  endTs?: long(name='EndTs'),
  interval?: long(name='Interval'),
  serviceArea?: string(name='ServiceArea'),
  startTs?: long(name='StartTs'),
}

model DescribeMeterRtcDurationResponseBody = {
  data?: [ 
    {
      audioDuration?: long(name='AudioDuration'),
      contentDuration?: long(name='ContentDuration'),
      timestamp?: long(name='Timestamp'),
      totalDuration?: long(name='TotalDuration'),
      v1080Duration?: long(name='V1080Duration'),
      v480Duration?: long(name='V480Duration'),
      v720Duration?: long(name='V720Duration'),
    }
  ](name='Data'),
  readyTs?: long(name='ReadyTs'),
  requestId?: string(name='RequestId'),
}

model DescribeMeterRtcDurationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMeterRtcDurationResponseBody(name='body'),
}

async function describeMeterRtcDurationWithOptions(request: DescribeMeterRtcDurationRequest, runtime: Util.RuntimeOptions): DescribeMeterRtcDurationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!Util.isUnset(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterRtcDuration',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterRtcDuration(request: DescribeMeterRtcDurationRequest): DescribeMeterRtcDurationResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterRtcDurationWithOptions(request, runtime);
}

model DescribeMeterRtcPeakChannelCntDataRequest {
  appId?: string(name='AppId'),
  endTs?: long(name='EndTs'),
  interval?: long(name='Interval'),
  serviceArea?: string(name='ServiceArea'),
  startTs?: long(name='StartTs'),
}

model DescribeMeterRtcPeakChannelCntDataResponseBody = {
  data?: [ 
    {
      activeChannelPeak?: long(name='ActiveChannelPeak'),
      activeChannelPeakTime?: long(name='ActiveChannelPeakTime'),
      timestamp?: long(name='Timestamp'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeMeterRtcPeakChannelCntDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMeterRtcPeakChannelCntDataResponseBody(name='body'),
}

async function describeMeterRtcPeakChannelCntDataWithOptions(request: DescribeMeterRtcPeakChannelCntDataRequest, runtime: Util.RuntimeOptions): DescribeMeterRtcPeakChannelCntDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!Util.isUnset(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterRtcPeakChannelCntData',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterRtcPeakChannelCntData(request: DescribeMeterRtcPeakChannelCntDataRequest): DescribeMeterRtcPeakChannelCntDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterRtcPeakChannelCntDataWithOptions(request, runtime);
}

model DescribeMeterRtcPeakUserCntDataRequest {
  appId?: string(name='AppId'),
  endTs?: long(name='EndTs'),
  interval?: long(name='Interval'),
  serviceArea?: string(name='ServiceArea'),
  startTs?: long(name='StartTs'),
}

model DescribeMeterRtcPeakUserCntDataResponseBody = {
  data?: [ 
    {
      activeUserPeak?: long(name='ActiveUserPeak'),
      activeUserPeakTime?: long(name='ActiveUserPeakTime'),
      timestamp?: long(name='Timestamp'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeMeterRtcPeakUserCntDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMeterRtcPeakUserCntDataResponseBody(name='body'),
}

async function describeMeterRtcPeakUserCntDataWithOptions(request: DescribeMeterRtcPeakUserCntDataRequest, runtime: Util.RuntimeOptions): DescribeMeterRtcPeakUserCntDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!Util.isUnset(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterRtcPeakUserCntData',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterRtcPeakUserCntData(request: DescribeMeterRtcPeakUserCntDataRequest): DescribeMeterRtcPeakUserCntDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterRtcPeakUserCntDataWithOptions(request, runtime);
}

model DescribeMeterRtcRtBandWidthUsageRequest {
  appId?: string(name='AppId'),
  endTs?: long(name='EndTs'),
  interval?: long(name='Interval'),
  serviceArea?: string(name='ServiceArea'),
  startTs?: long(name='StartTs'),
}

model DescribeMeterRtcRtBandWidthUsageResponseBody = {
  data?: [ 
    {
      anchorPeakRate?: float(name='AnchorPeakRate'),
      anchorPeakTs?: long(name='AnchorPeakTs'),
      audiencePeakRate?: float(name='AudiencePeakRate'),
      audiencePeakTs?: long(name='AudiencePeakTs'),
      peakRate?: float(name='PeakRate'),
      peakTs?: long(name='PeakTs'),
      timestamp?: long(name='Timestamp'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeMeterRtcRtBandWidthUsageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMeterRtcRtBandWidthUsageResponseBody(name='body'),
}

async function describeMeterRtcRtBandWidthUsageWithOptions(request: DescribeMeterRtcRtBandWidthUsageRequest, runtime: Util.RuntimeOptions): DescribeMeterRtcRtBandWidthUsageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!Util.isUnset(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterRtcRtBandWidthUsage',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterRtcRtBandWidthUsage(request: DescribeMeterRtcRtBandWidthUsageRequest): DescribeMeterRtcRtBandWidthUsageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterRtcRtBandWidthUsageWithOptions(request, runtime);
}

model DescribeMeterRtcRtFlowUsageRequest {
  appId?: string(name='AppId'),
  endTs?: long(name='EndTs'),
  interval?: long(name='Interval'),
  serviceArea?: string(name='ServiceArea'),
  startTs?: long(name='StartTs'),
}

model DescribeMeterRtcRtFlowUsageResponseBody = {
  data?: [ 
    {
      anchorFlowValue?: float(name='AnchorFlowValue'),
      audienceFlowValue?: float(name='AudienceFlowValue'),
      flowValue?: float(name='FlowValue'),
      timestamp?: long(name='Timestamp'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeMeterRtcRtFlowUsageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMeterRtcRtFlowUsageResponseBody(name='body'),
}

async function describeMeterRtcRtFlowUsageWithOptions(request: DescribeMeterRtcRtFlowUsageRequest, runtime: Util.RuntimeOptions): DescribeMeterRtcRtFlowUsageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!Util.isUnset(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterRtcRtFlowUsage',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterRtcRtFlowUsage(request: DescribeMeterRtcRtFlowUsageRequest): DescribeMeterRtcRtFlowUsageResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterRtcRtFlowUsageWithOptions(request, runtime);
}

model DescribeMeterRtcUserCntDataRequest {
  appId?: string(name='AppId'),
  endTs?: long(name='EndTs'),
  interval?: long(name='Interval'),
  serviceArea?: string(name='ServiceArea'),
  startTs?: long(name='StartTs'),
}

model DescribeMeterRtcUserCntDataResponseBody = {
  data?: [ 
    {
      activeUserCnt?: long(name='ActiveUserCnt'),
      timestamp?: long(name='Timestamp'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeMeterRtcUserCntDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeMeterRtcUserCntDataResponseBody(name='body'),
}

async function describeMeterRtcUserCntDataWithOptions(request: DescribeMeterRtcUserCntDataRequest, runtime: Util.RuntimeOptions): DescribeMeterRtcUserCntDataResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.endTs)) {
    query['EndTs'] = request.endTs;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.serviceArea)) {
    query['ServiceArea'] = request.serviceArea;
  }
  if (!Util.isUnset(request.startTs)) {
    query['StartTs'] = request.startTs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeMeterRtcUserCntData',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeMeterRtcUserCntData(request: DescribeMeterRtcUserCntDataRequest): DescribeMeterRtcUserCntDataResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeMeterRtcUserCntDataWithOptions(request, runtime);
}

model DescribeNewPlayVideoPlaySessionEventDetailRequest {
  bizDate?: long(name='BizDate'),
  inputStatus?: string(name='InputStatus'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  VPS?: string(name='VPS'),
}

model DescribeNewPlayVideoPlaySessionEventDetailResponseBody = {
  data?: [ 
    {
      bizTime?: string(name='BizTime'),
      cost?: string(name='Cost'),
      details?: string(name='Details'),
      eventName?: string(name='EventName'),
      IP?: string(name='IP'),
      ISP?: string(name='ISP'),
      isNormal?: int32(name='IsNormal'),
      networkType?: string(name='NetworkType'),
      region?: string(name='Region'),
      subject?: string(name='Subject'),
    }
  ](name='Data'),
  pageNum?: long(name='PageNum'),
  pageSize?: long(name='PageSize'),
  readyTs?: long(name='ReadyTs'),
  requestId?: string(name='RequestId'),
  totalNum?: long(name='TotalNum'),
}

model DescribeNewPlayVideoPlaySessionEventDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNewPlayVideoPlaySessionEventDetailResponseBody(name='body'),
}

async function describeNewPlayVideoPlaySessionEventDetailWithOptions(request: DescribeNewPlayVideoPlaySessionEventDetailRequest, runtime: Util.RuntimeOptions): DescribeNewPlayVideoPlaySessionEventDetailResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.bizDate)) {
    query['BizDate'] = request.bizDate;
  }
  if (!Util.isUnset(request.inputStatus)) {
    query['InputStatus'] = request.inputStatus;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.VPS)) {
    query['VPS'] = request.VPS;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNewPlayVideoPlaySessionEventDetail',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeNewPlayVideoPlaySessionEventDetail(request: DescribeNewPlayVideoPlaySessionEventDetailRequest): DescribeNewPlayVideoPlaySessionEventDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNewPlayVideoPlaySessionEventDetailWithOptions(request, runtime);
}

model DescribeNewPlayVideoPlaySessionListRequest {
  endTimeStamp?: string(name='EndTimeStamp'),
  inputStatus?: string(name='InputStatus'),
  order?: string(name='Order'),
  pageNum?: int32(name='PageNum'),
  pageSize?: int32(name='PageSize'),
  startTimeStamp?: string(name='StartTimeStamp'),
  uniqueId?: string(name='UniqueId'),
}

model DescribeNewPlayVideoPlaySessionListResponseBody = {
  data?: [ 
    {
      gmtModifiedTime?: string(name='GmtModifiedTime'),
      status?: string(name='Status'),
      traceId?: string(name='TraceId'),
      UUID?: string(name='UUID'),
      VPS?: string(name='VPS'),
    }
  ](name='Data'),
  pageNum?: long(name='PageNum'),
  pageSize?: long(name='PageSize'),
  readyTs?: long(name='ReadyTs'),
  requestId?: string(name='RequestId'),
  totalNum?: long(name='TotalNum'),
}

model DescribeNewPlayVideoPlaySessionListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNewPlayVideoPlaySessionListResponseBody(name='body'),
}

async function describeNewPlayVideoPlaySessionListWithOptions(request: DescribeNewPlayVideoPlaySessionListRequest, runtime: Util.RuntimeOptions): DescribeNewPlayVideoPlaySessionListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.endTimeStamp)) {
    query['EndTimeStamp'] = request.endTimeStamp;
  }
  if (!Util.isUnset(request.inputStatus)) {
    query['InputStatus'] = request.inputStatus;
  }
  if (!Util.isUnset(request.order)) {
    query['Order'] = request.order;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.startTimeStamp)) {
    query['StartTimeStamp'] = request.startTimeStamp;
  }
  if (!Util.isUnset(request.uniqueId)) {
    query['UniqueId'] = request.uniqueId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNewPlayVideoPlaySessionList',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeNewPlayVideoPlaySessionList(request: DescribeNewPlayVideoPlaySessionListRequest): DescribeNewPlayVideoPlaySessionListResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNewPlayVideoPlaySessionListWithOptions(request, runtime);
}

model DescribeNewPlayVideoPlaySessioninfoRequest {
  VPS?: string(name='VPS'),
}

model DescribeNewPlayVideoPlaySessioninfoResponseBody = {
  data?: [ 
    {
      appId?: string(name='AppId'),
      appName?: string(name='AppName'),
      appVersion?: string(name='AppVersion'),
      deviceBrand?: string(name='DeviceBrand'),
      deviceModel?: string(name='DeviceModel'),
      OS?: string(name='OS'),
      OV?: string(name='OV'),
      terminalType?: string(name='TerminalType'),
      VPS?: string(name='VPS'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId'),
}

model DescribeNewPlayVideoPlaySessioninfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNewPlayVideoPlaySessioninfoResponseBody(name='body'),
}

async function describeNewPlayVideoPlaySessioninfoWithOptions(request: DescribeNewPlayVideoPlaySessioninfoRequest, runtime: Util.RuntimeOptions): DescribeNewPlayVideoPlaySessioninfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.VPS)) {
    query['VPS'] = request.VPS;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DescribeNewPlayVideoPlaySessioninfo',
    version = '2021-04-25',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

async function describeNewPlayVideoPlaySessioninfo(request: DescribeNewPlayVideoPlaySessioninfoRequest): DescribeNewPlayVideoPlaySessioninfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return describeNewPlayVideoPlaySessioninfoWithOptions(request, runtime);
}

